<!DOCTYPE html>
<html>
<head lang="en">
	<title>Spring Boot Demo - FreeMarker</title>
	
	<link href="/css/index.css" rel="stylesheet" />
	<link href="../css/buttoncss.css" rel="stylesheet" />
	<link href="../css/css.css" rel="stylesheet" />
	<link href="../css/index.css" rel="stylesheet" />
<#--	<link href="../css/circle-shadow.css" rel="stylesheet" />-->
<#--	<link href="../css/loading.css" rel="stylesheet" />-->
<#--	<link href="../css/loading-circle.css" rel="stylesheet" />-->


</head>
<body>
	<center>
<#--		<img src="/images/logo.png" />-->
		<h2>请输入1流文件地址</h2>
		<input type="text" id="liu1"/>
		<h2>请输入2流文件地址</h2>
		<input type="text" id="liu2"/>
		<h2>请输入2流的名称</h2>
		<input type="text" id="liu2Name">
		<br/>
<#--		<h1 id="title">${title}</h1>-->
		<button type="button" id="subButton">提交</button>
		<button type="button" id="closeButton">关闭流</button>
	</center>
	
	<script type="text/javascript" src="/webjars/jquery/2.1.4/jquery.min.js"></script>
	
	<script>
	
				


		$(function(){
			$('#subButton').click(function(){
				//
				var arrat = {
					liu1: $("#liu1").val(),
					liu2:$("#liu2").val(),
					liu2Name: $("#liu2Name").val()
				};
				$.ajax({
	        		url: "http://localhost:8080/web/saveRtspUrl",
		            type: "POST",
					data:JSON.stringify(arrat),
					contentType: "application/json;charset=UTF-8",
		            success: function(data, status, xhr) {
		            	console.log(data);
		            	//alert(data);
		            }
	            });
			});

			$('#closeButton').click(function(){
				//
				var arrat = {

				};
				$.ajax({
					url: "http://localhost:8080/web/closeRtspUrl",
					type: "POST",
					data:JSON.stringify(arrat),
					contentType: "application/json;charset=UTF-8",
					success: function(data, status, xhr) {
						console.log(data);
						//alert(data);
					}
				});
			});
		})
	</script>
</body>
</html>